package com.ccz.demo.design.chain;


import com.ccz.demo.util.ConfigReaderUtil;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ChainClient {

    public static void main(String[] args) {
        Rule rule = new Rule("等级一", null, 1);
        FilterChain chain = new FilterChain();
        log.info(ConfigReaderUtil.getValue("test_1"));
        chain.addFilters(FilterFactory.getFilters("com.ccz.demo.design"));
        chain.doFilter(rule, chain);
        System.out.println(rule.getLevel());
    }


}
